/* GUI CONVERTED from rcsoisk2.p (converter v1.75) Tue Apr 10 12:05:53 2001 */
/* rcsoisk2.p - Shipper Confirmation Process Kit - Component sr_wkfl          */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                        */
/* All rights reserved worldwide.  This is an unpublished work.               */
/* $Revision: 1.2.1.2 $                                                       */
/*V8:ConvertMode=Maintenance                                                  */
/* REVISION: 8.6    LAST MODIFIED: 10/18/96  BY: *K003* Forrest Mori          */
/* REVISION: 8.6    LAST MODIFIED: 05/20/98  BY: *K1Q4* Alfred Tan            */
/* REVISION: 9.1    LAST MODIFIED: 08/12/00  BY: *N0KP* Mark Brown            */
/* $Revision: 1.2.1.2 $  BY: Jean Miller     DATE: 03/22/01   ECO: *P008*     */
/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/

{mfdeclre.i}

/* INPUT VARIABLES */
define input parameter confirm_mode like mfc_logical no-undo.
define input parameter srline       like sr_lineid no-undo.
define input parameter srsite       like sr_site no-undo.
define input parameter srloc        like sr_loc no-undo.
define input parameter srlot        like sr_lotser no-undo.
define input parameter srref        like sr_ref no-undo.
define input parameter srqty        like sr_qty no-undo.

find sr_wkfl where
     sr_userid = mfguser and
     sr_lineid = srline  and
     sr_site = srsite    and
     sr_loc = srloc      and
     sr_lotser = srlot   and
     sr_ref = srref
exclusive-lock no-error.

if not available sr_wkfl then do:
   create sr_wkfl.
   assign
      sr_userid = mfguser
      sr_lineid = srline
      sr_site = srsite
      sr_loc = srloc
      sr_lotser = srlot
      sr_ref = srref.
end.

if recid(sr_wkfl) = -1 then.

if confirm_mode then
   sr_qty =   srqty.
else
   sr_qty = - srqty.
